import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import { HOME_PAGE, CALCULATOR_PAGE } from './constants/link';
import HomePage from './containers/Home';
import ClaculatorPage from './containers/tools/Calculator';

export default class Routes extends React.Component {
  render() {
    return (
      <Switch>
        <Route path={HOME_PAGE} exact component={HomePage} />
        <Route path={CALCULATOR_PAGE} component={ClaculatorPage} />
        <Route render={() => <Redirect to={HOME_PAGE} />} />
      </Switch>
    )
  }
}